<?php
/**
 * slider 首页幻灯片模型
 */
namespace app\models;
use core\lib\model;

class sliderModel extends model
{
  public $table='zn_slider';

  //获取所有表数据
  public function getLists(){
    $ret=$this->select($this->table,'*');
    return $ret;
  }

  //获取单条数据
  public function getOne($id){
    $ret=$this->select($this->table,'*',['id'=>$id]);
    return $ret;
  }

  //更新单条数据
  public function setOne($id,$data){
    return  $this->update($this->table,$data,['id'=>$id]);

  } 


}





